﻿using System;
using System.Collections.ObjectModel;
using System.IdentityModel.Tokens;
using SecurityTokenServiceNS;
using System.IdentityModel.Claims;
using System.ServiceModel.Security;
using System.ServiceModel.Security.Tokens;

namespace IssuedClaimsAddIns
{
	public class IssuedClaimsModuleISIP : IIssuedClaimsProcessor
	{
		public void GetIssuedClaims(RST rst, Collection<Claim> claims)
		{
			if (rst.Extensions.ContainsKey(Constants.WSIdentity.Elements.PPID))
				claims.Add(new Claim(ClaimTypes.PPID, rst.Extensions[Constants.WSIdentity.Elements.PPID], Rights.PossessProperty));
		}
	}
}
